<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>弹性盒</title>
  <style>
    .box {
      width: 500px;
      height: 500px;
      border: 2px solid black;
      margin: 100px auto;
      display: flex;
      /* 弹性盒 */
      flex-direction: row;
      /* 调整主轴是行是列，row行，column列，row-verse行的反方向，column-reverse列的反方向 */
    }

    .box span {
      width: 50px;
      height: 50px;
      border: 1px dashed red;

    }
  </style>
</head>

<body>
  <!-- 弹性盒是一种新的布局方式，特别适合移动端布局 -->
  <!-- 影响:
    1.子元素默认横向排列
    2.行内元素，变成了块级元素
    3.只有一个元素的时候，margin：auto 自动居中
    -->
  <div class="box">
    <span>1111</span>
    <span>2222</span>
    <span>3333</span>
    <span>4444</span>
    <!-- <span>5555</span> -->
  </div>
</body>

</html>